package cn.chengpengper.im.sdk.application.consumer;

import cn.chengpengper.im.common.domain.constant.ImConstants;
import cn.chengpengper.im.common.domain.model.ImSendResult;
import com.alibaba.fastjson.JSONObject;


public class BaseMessageResultConsumer {

    protected ImSendResult<?> getResultMessage(String msg) {
        JSONObject jsonObject = JSONObject.parseObject(msg);
        String eventStr = jsonObject.getString(ImConstants.MSG_KEY);
        return JSONObject.parseObject(eventStr, ImSendResult.class);
    }
}
